app.filter("Myspecification", function() {
    return function(val) {
        var str = JSON.stringify(val);
        var j = str.indexOf("：");
        var strs = str.substring(j);

        strs = strs.replace(/"|\{/g, "");
        return strs + " ";
    }
});
app.filter("my_option", function() {
    return function(val) {
        var strs = "";
        var opt = val;
        for (x in val) {
            if (x != 'amount' && x != "$$hashKey" && x != "price" && x != "published") {
                // strs = strs + eval('val.' + x) + " ";
                strs = strs + val[x] + " ";
            }
        }
        // if (key != 'amount' && key != "$$hashKey" && key != "price" && key != "published") {
        //     strs = val + " ";
        // }
        return strs;
    }
});

app.filter("my_dingdan", function() {
    return function(val, key) {
        var strs = "";
        var opt = val;
        if (key != 'amount' && key != "$$hashKey" && key != "price" && key != "published") {
            strs = val + " ";
        }
        return strs;
    }
});


app.filter('trustHtml', function($sce) {
    return function(input) {
        return $sce.trustAsHtml(input);
    }
});